package com.luoran.bartalks.service.impl;

import java.util.List;

import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.luoran.bartalks.dao.IBtTransoprtModeDao;
import com.luoran.bartalks.entity.BaseInfo;
import com.luoran.bartalks.entity.biz.BtTransportMode;
import com.luoran.bartalks.service.IBtTransportModeService;

@Service
public class BtTransportModeService implements IBtTransportModeService {

	@Autowired
	private IBtTransoprtModeDao dao;

	@Override
	public PageQuery<? extends BaseInfo> getQueryList(PageQuery<? extends BaseInfo> pageQuery) {
		dao.queryPage(pageQuery);
		return pageQuery;
	}


	@Override
	public BtTransportMode addTransportMode(BtTransportMode btTransportMode) {
		 dao.insert(btTransportMode);
		return btTransportMode;
	}

	@Override
	public void editBtTransportMode(BtTransportMode btTransportMode) {
		dao.updateTemplateById(btTransportMode);
	}

	@Override
	public BtTransportMode getBtTransportMode(String id) {
		return dao.single(id);
	}

	@Override
	public void deleteBtTransportMode(String id) {
		dao.deleteById(id);
	}

	@Override
	public BtTransportMode getBtTransportModeByCode(String transportCode, String companyId) {
		return dao.getBtTransportModeByCode(transportCode, companyId);
	}


	@Override
	public List<BtTransportMode> getBtTransportModeByCompanyId(String companyId) {
		return dao.getBtTransportModeByCompanyId(companyId);
	}


	@Override
	public void deleteBtTransportModeById(String id) {
		dao.deleteBtTransportModeById(id);
	}


	@Override
	public List<BtTransportMode> getTransportModeStencilList(String CompanyId) {
		return dao.getTransportModeStencilList(CompanyId);
	}

}
